//
//  GlobalRx.swift
//  TuneMate
//
//  Created by 丸子 on 2023/11/23.
//

import Foundation

enum AppState {
    case willResignActive       // 即将结束活动状态（进入后台）
    case didEnterBackground     // 已经进入后台
    case willEnterForeground    // 即将进入活动状态（进入前台）
    case didBecomeActive        // 已经进入前台
}

class GlobalRx {
    static let appStateSubject = PublishSubject<AppState>()
    static let requestErrSubject = PublishSubject<ReqServerCode>()//网络有问题
    static let loginSuccessSubject = PublishSubject<Void>()//网络有问题
    static let userInfoSubject = PublishSubject<AccountModel>()//网络有问题
    static let loginSubject = PublishSubject<Void>()//网络有问题
    static let jumpDrawSubject = PublishSubject<Void>()
    
    
    static let playStateSubject = PublishRelay<SUPlayerState>()
    static let updateMusicProgress = PublishRelay<(String, String, Float)>()
    static let musicRemoveObserverSubject = PublishSubject<Void>()
    static let updateMusicInfo = PublishRelay<MusicModel>()
    static let updateHomeData = PublishSubject<Int>()

}
